package com.ttsx.core.common.result;

import lombok.Getter;

/**
 * 返回状态码枚举
 *
 * @author wb
 * @since 2025-03-01
 */

@Getter
public enum ResultCodeEnum {

    SUCCESS(200, "成功"),
    FAILURE(201, "失败"),

    USERNAME_PASSWORD_ERROR(203, "用户名或密码错误"),
    PERMISSION_DENIED(204, "没有权限访问"),

    SERVER_ERROR(500, "服务器异常"),
    FILE_UPLOAD_ERROR(500, "文件上传失败"),

    FILE_NOT_FIND(500, "文件不存在"),

    DATA_EXPORT_ERROR(500, "数据导出失败"),
    DATA_IMPORT_ERROR(500, "数据导入失败"),
    FILE_TOO_LARGE(500, "文件过大"),
    CAPTCHA_NOT_EXISTS(500, "验证码已过期"),
    CAPTCHA_ERROR(500, "验证码错误");


    private final Integer code;
    private final String message;

    ResultCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
